Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

688
Views
Problemas para corregir el error de Discord.js TypeError [CLIENT_MISSING_INTENTS]: se deben proporcionar intentos válidos para el cliente

Entonces, comencé a codificar un bot en Javascript, algo con lo que nunca había trabajado antes. Estoy siguiendo los pasos exactos que veo en el video, aunque cuando ejecuto node . en la terminal me sale un error:

 TypeError [CLIENT_MISSING_INTENTS]: Valid intents must be provided for the Client. at Client._validateOptions (C:\Users\Acer\Desktop\Discord\Bots\SE\node_modules\discord.js\src\client\Client.js:548:13) at new Client (C:\Users\Acer\Desktop\Discord\Bots\SE\node_modules\discord.js\src\client\Client.js:76:10) at Object.<anonymous> (C:\Users\Acer\Desktop\Discord\Bots\SE\index.js:2:13) at Module._compile (node:internal/modules/cjs/loader:1105:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) at node:internal/main/run_main_module:17:47 { [Symbol(code)]: 'CLIENT_MISSING_INTENTS' }

Este es mi código:

 const { Client, Intents } = require('discord.js'); const client = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES] }); const Discord = require('discord.js'); const bot = new Discord.Client(); const token = 'i aint showing you my token'; const PREFIX = ''; bot.on('ready', () => { console.log('SEBot is online.') }) bot.login(token)

No entiendo cuál es el problema, y un poco de ayuda realmente funcionaría. Gracias.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Entonces, en primer lugar, ya inicializó su cliente con

 const client = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES] });

Luego inicializaste otro, que ahora es inútil. deberías quitar

 const Discord = require('discord.js'); const bot = new Discord.Client();

también su cliente (que tiene intenciones válidas) debe ser el que llame a la función .on() , así que cambie bot.on() y bot.login() a client.on y client.login

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!